home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 June / Software of the Month Club 1996 June.iso / pc / dos / dtp / aurora / tips.dox < prev    next >
Encoding:
Text File  |  1995-02-24  |  16.9 KB  |  415 lines

  1.  
  2.  
  3. Miscellaneous Aurora User Tips
  4. ──────────────────────────────
  5. This file contains a few miscellaneous Aurora user tips which you may
  6. wish to review. For complete documentation on how to install and use
  7. Aurora, see the Aurora Editor Users Guide (USER.DOX). Note that any key
  8. definitions shown here are the Aurora-style defaults.
  9.  
  10.  
  11. Basic Configuration
  12. ───────────────────
  13.  ∙ The editor should always be installed in an empty directory. Never
  14.    mix files from different editor versions.
  15.  
  16.  ∙ Whenever you make a change to any of the editor configuration files
  17.    (such as CONFIG.AML, KBD.AML, MENU.AML, etc.), you must enter the
  18.    'recompile' command ('Recompile the editor' <alt f2> on the Set menu)
  19.    for your changes to take effect.
  20.  
  21.  ∙ If you prefer to start Aurora by another name, you can simply rename
  22.    the file A.EXE to whatever you wish (such as E.EXE). Do not rename
  23.    any other files distributed with the editor.
  24.  
  25.  ∙ You can re-install Aurora by selecting 'Run installation' from the
  26.    Sample Utilities Macros menu (on the Macro menu).
  27.  
  28.  
  29. The Keyboard
  30. ────────────
  31.  ∙ When adding new key definitions to KBD.AML, be sure to place each
  32.    definition in the appropriate 'object' for the window in which you
  33.    would like the key to be active.
  34.  
  35.  ∙ If you have added or changed keyboard definitions, you will probably
  36.    also want to change any Menu definitions which show the old keys.
  37.  
  38.  ∙ To prevent the editor from using the keypad <grey />, <grey *>, <grey
  39.    ->, and <grey +> keys as function keys, simply remove these function
  40.    key definitions from KBD.AML. Be sure to remove them from within both
  41.    the 'prompt' and 'edit' objects.
  42.  
  43.  ∙ To execute a key or macro function from the DOS command line, use the
  44.    '-e' command line option. Key or event names must be enclosed in
  45.    double quotes. For example:
  46.  
  47.      C>a -emymacro
  48.         // executes the function 'mymacro' after the editor is started
  49.  
  50.      C>a -e"<shift f1>" -e"<alt =>"
  51.         // simulates <shift f1>, <alt => after the editor is started
  52.  
  53.  ∙ New keyboard layouts for other editors/word processors may be added
  54.    periodically to the Aurora Support BBS (see READ.ME for access
  55.    details). Check the BBS if your favorite layout is not included in
  56.    the distributed version of Aurora.
  57.  
  58.  
  59. The Mouse
  60. ─────────
  61.  ∙ If windows scroll too fast when using the mouse, change the
  62.    'MouDelay' setting in CONFIG.AML to a higher value.
  63.  
  64.  ∙ To hide the mouse pointer whenever a key pressed, change the
  65.    'MouseOpt' setting in CONFIG.AML to 'd'.
  66.  
  67.  
  68. The Menus
  69. ─────────
  70.  ∙ If part of a pull-down menu is displayed off the edge of the screen,
  71.    you can use the mouse to grab the menu border and drag the menu to a
  72.    better position.
  73.  
  74.  ∙ To hide the menu bar so that it is only displayed when <esc> or the
  75.    right mouse button is pressed, remove 'm' from the 'EditStyle'
  76.    setting in CONFIG.AML.
  77.  
  78.  ∙ To jump quickly to a file within a file picklist or the file manager,
  79.    enter the first letter of the desired filename repeatedly until the
  80.    cursor is positioned at the file.
  81.  
  82.  
  83. Prompts
  84. ───────
  85.  ∙ The ASCII Chart <alt => can be displayed from within a prompt and
  86.    used to enter any character. The 'literal' <ctrl [> command can also
  87.    be used to enter any character in a prompt.
  88.  
  89.  ∙ Use <pgup> or <pgdn> within a prompt, or press the left mouse button
  90.    on the retrieve tab () to display a popup menu of all prompt
  91.    history. You can enter a history string into the prompt by pressing
  92.    the <enter> key or the left mouse button.
  93.  
  94.  ∙ Use the 'Prompt Style' command on the Window menu to sample the four
  95.    editor prompt styles. To change the default prompt style when the
  96.    editor is started, see the 'PromptStyle' configuration setting in
  97.    CONFIG.AML.
  98.  
  99.  ∙ To move the cursor a relative number of lines away from the current
  100.    position in the 'goto line' <ctrl j> prompt, specify '+' or '-'
  101.    before the line number.
  102.  
  103.  ∙ The 'Macro Expression' prompt <ctrl v> on the Macro menu can be used
  104.    as a command line calculator, since the macro language compiler and
  105.    interpreter are available at this prompt. For example:
  106.  
  107.      Macro Expression>  say 1 + 2 + 30 - 40    <enter>
  108.        // displays -7
  109.      Macro Expression>  msgbox (4 * 15) mod 7  <enter>
  110.        // displays 4
  111.      Macro Expression>  write 1 + 2 * 3 + 4    <enter>
  112.        // enters the string '11' at the cursor
  113.  
  114.  
  115. The Desktop
  116. ───────────
  117.  ∙ You can prevent windows from remembering their sizes, cursor
  118.    positions, and settings by changing the 'SavePosition' setting in
  119.    CONFIG.AML to 'n'.
  120.  
  121.  ∙ To use the existing DOS screen as the editor background when the
  122.    editor is started, change the 'VidStr' setting in CONFIG.AML to ''
  123.    (null).
  124.  
  125.  ∙ If your video card supports special video modes such as 132 x 43, you
  126.    can use these video modes within the editor by setting the 'VidCols'
  127.    and 'VidRows' in CONFIG.AML to zero. Then set the desired video mode
  128.    in DOS before starting the editor.
  129.  
  130.  ∙ Use the 'showentry' command to display the screen as it appeared in
  131.    DOS before the editor was started.
  132.  
  133.  
  134. Syntax Highlighting
  135. ───────────────────
  136.  ∙ To conserve editor resources, include only the syntax highlighting
  137.    definitions in SYNTAX.AML that you actually use.
  138.  
  139.  ∙ Additional syntax highlighting definitions are containing in the file
  140.    SYNTAX2.AML.
  141.  
  142.  ∙ If you are using syntax highlighting with multi-line comments in your
  143.    program source code, you may wish to increase the number of lines to
  144.    scan backward in SYNTAX.AML, for the file extension you are editing.
  145.    Note however, that this will decrease scrolling performance for
  146.    highlighted files.
  147.  
  148.  ∙ The 'hiliteword' <ctrl \> command highlights all occurrences of the
  149.    word at the cursor. This can be very useful for finding instances of
  150.    a word in a document, or marking occurrences of variables, functions,
  151.    or other identifiers in your program source code.
  152.  
  153.  ∙ Individual keywords can be highlighted in colors different from the
  154.    default keyword color by treating the keyword as an object variable
  155.    and assigning it the desired color attribute. For example, in
  156.    SYNTAX.AML:
  157.  
  158.      keyword
  159.        .
  160.        .      // end of keyword list
  161.  
  162.      _if   = color brightred on blue
  163.      _else = color yellow    on blue
  164.  
  165.  
  166. History
  167. ───────
  168.  ∙ To erase all of your existing prompt history, window positions, etc.,
  169.    simply delete HISTORY.DAT after you have exited the editor.
  170.  
  171.  ∙ Do not attempt to manually update the history file HISTORY.DAT. This
  172.    file is automatically updated by the editor during normal usage.
  173.  
  174.  
  175. Opening Files
  176. ─────────────
  177.  ∙ To open a file manager window for the current directory from the DOS
  178.    command line, enter "a .".
  179.  
  180.  ∙ To open a file from the DOS command line and place the cursor on a
  181.    specific line, enter the option 'l' followed by the line number. For
  182.    example:
  183.  
  184.      C>a myfile.txt/l253
  185.        // opens 'myfile.txt' and places the cursor on line 253
  186.  
  187.  ∙ To open a binary file from the DOS command line or the Open prompt
  188.    ('askopen' <alt e> on the File menu) using a specific line length,
  189.    enter the option 'b' followed by the line length. For example:
  190.  
  191.      C>a myfile.txt/b240
  192.        // opens 'myfile.txt' in binary mode with a fixed line length
  193.        //   of 240
  194.  
  195.  ∙ To configure the editor so that tab characters (ASCII 9) are
  196.    automatically expanded when files are opened, see example 21 of
  197.    EXAMPLE.AML in the MACRO subdirectory.
  198.  
  199.  ∙ If you are using Aurora in an MS Windows 3.x DOS box running in
  200.    enhanced mode, you can transfer up to 16k of text data to and from
  201.    the Windows clipboard. This is done by loading from or saving to a
  202.    file with the special drive name: ^. For example, from the Open and
  203.    Insert and Save block prompts:
  204.  
  205.      File to insert in MYFILE.TXT>  ^:c
  206.        // insert the contents of the Windows clipboard after the cursor
  207.  
  208.      Save block as>  ^:c
  209.        // copy marked text to the Windows clipboard
  210.  
  211.  
  212. Searching
  213. ─────────
  214.  ∙ Frequently-used search strings can be saved in a separate file and
  215.    copied to a find prompt as needed by using the 'copyblock2' <alt c>
  216.    or 'paste' <grey*> commands. This can be especially convenient for
  217.    long or complex regular expression patterns.
  218.  
  219.  ∙ To count the occurrences of a search string, use the 'a' search
  220.    option. For example:
  221.  
  222.      Find>  gizmo/a  <enter>
  223.        // displays the number of occurrences of the word 'gizmo'
  224.        //   from the cursor to the end of the file
  225.  
  226.  ∙ Use regular expression searching to search for the beginning and/or
  227.    end of lines. Do not attempt to search for line delimiter characters
  228.    (such as carriage returns and linefeeds) in non-binary files. In the
  229.    normal, non-binary editing mode, line delimiter characters are
  230.    removed from the end of each line when the file is loaded and
  231.    re-appended to the end of each line when the file is saved.
  232.  
  233.  ∙ The 'Find Occurrences' <ctrl h> command can be useful for extracting
  234.    lines from a flat database file that match search criteria. For
  235.    example:
  236.  
  237.      Find Occurrences of>  Joe/b
  238.        // extract all lines where 'Joe' is found within a column mark
  239.  
  240.  ∙ The 'Find Occurrences' <ctrl h> command can be used together with
  241.    regular expression searching to display a list of function headers in
  242.    your program source code. For example:
  243.  
  244.      Find Occurrences of>  ^[a-zA-Z_].*\(.*[~;]$/x
  245.        // finds C/C++ function definitions beginning in column 1
  246.  
  247.      Find Occurrences of>  ^ *{function}|{key}.*$/x
  248.        // finds AML function and key definitions
  249.  
  250.  ∙ Selecting a file from a file manager scan window (generated by the
  251.    'askscan' <ctrl s> command) will position the cursor to the first
  252.    occurrence of the scan search string. Use the 'findlast' <ctrl l>
  253.    command to find other occurrences.
  254.  
  255.  
  256. Manipulating Text
  257. ─────────────────
  258.  ∙ The 'quote' <shift f9> and 'commentline' <alt f1> commands can both
  259.    be used for simple text quoting. <shift f9> performs block quoting,
  260.    while <alt f1> quotes and unquotes text on a line-by-line basis.
  261.  
  262.  ∙ The editor is configured at installation to use 'live word wrap' when
  263.    <ctrl w> is pressed. If you prefer the standard old-style word wrap,
  264.    change the definition of <ctrl w> in KBD.AML to:
  265.  
  266.      key  <ctrl w>    setting 'W' TOGGLE   // toggle standard word wrap
  267.  
  268.  ∙ To reformat all of the text in a file, mark the entire file using the
  269.    'markline' <alt l> command, and then enter the 'Reformat' command
  270.    <alt r> on the Block menu.
  271.  
  272.  ∙ The 'fillblock2' <ctrl k><f> command can be used to fill a marked
  273.    block with a repeating character or string. For example: to fill
  274.    columns 40-47 of a data file with the date 12/25/96, mark the
  275.    desired columns by using the 'markcolumn' command <ctrl b>, and then
  276.    enter the date at the 'fillblock2' prompt.
  277.  
  278.  ∙ The clipboard Cut Append <ctrl grey-> and Copy Append <ctrl grey+>
  279.    commands can be very useful for gathering separate blocks of text and
  280.    grouping them together in the clipboard.
  281.  
  282.  ∙ To expand tab characters (ASCII 9) in the current file, use the
  283.    'tabfile' <ctrl k><x> command.
  284.  
  285.  ∙ To ignore case when sorting marked text with the 'sortblock2' <ctrl
  286.    k><o> command, turn insert mode ON. To sort in descending order, turn
  287.    scroll lock ON.
  288.  
  289.  ∙ Have you ever been prompted to save changes in a file, and you forgot
  290.    what changes you just made? Try using the undo/redo feature to review
  291.    your changes. Just cancel the 'save' prompt and use the undo <ctrl u>
  292.    and redo <ctrl y> commands to backtrack and retrace your changes
  293.    before exiting.
  294.  
  295.  ∙ To the change the line delimiter that a file is saved with, load the
  296.    file into the editor, change the current 'Line Delimiter' setting (on
  297.    the Set menu) to the new line delimiter, and save the file.
  298.  
  299.  ∙ To disable CUA-style <shift> key marking, remove the 'smark' command
  300.    from all key definitions in KBD.AML.
  301.  
  302.  ∙ Use the 'markpara' <alt 3> command to quickly mark the paragraph at
  303.    the cursor.
  304.  
  305.  ∙ To rearrange all the words in a paragraph in sorted order:
  306.  
  307.      1. Use the 'markcolumn' <alt b> command to mark column 1 of the
  308.         entire paragraph.
  309.      2. Enter the 'formatblock2' command <alt r> to place each word on
  310.         separate line.
  311.      3. Enter the 'markpara' <alt 3> command to re-mark the separated
  312.         paragraph with a line mark.
  313.      4. Set Insert mode ON to ignore case during the sort.
  314.      5. Enter the 'sortblock2' <ctrl k><o> command to sort the words.
  315.      6. Enter the 'formatblock2' command <alt r> to re-join all
  316.         separated lines back together into a paragraph.
  317.  
  318.  
  319. Working with very large files
  320. ─────────────────────────────
  321.  ∙ If you are performing extensive 'search and replace all' operations
  322.    in a very large file, or you are making other large-scale
  323.    modifications to the file, you will get better performance if 'Undo'
  324.    is disabled on the Set menu.
  325.  
  326.  ∙ Aurora can be useful for editing very large files when running under
  327.    OS/2 or Windows. Although other editors may exploit the virtual
  328.    memory capabilities of these environments, Aurora uses its own
  329.    virtual memory (optimized for text editing), and will not force other
  330.    OS/2 or Windows applications to be swapped out or discarded when very
  331.    large files are loaded and edited. The 'memoptions' setting in
  332.    SYSTEM.AML should be set to 'o' for the best performance.
  333.  
  334.  ∙ Setting 'memoptions' to 'o' in SYSTEM.AML allows large files to be
  335.    kept open (in DOS) while they are being edited. This feature can
  336.    greatly increase the loading performance for very large files.
  337.    However, in some cases there may be conflicts with other programs
  338.    trying to access the open file. If this is a problem for you, set
  339.    'memoptions' to '' (null).
  340.  
  341.  ∙ Before saving changes to very large files, you may wish to conserve
  342.    disk space by disabling file 'Backup' on the Set menu. Obviously,
  343.    this should only be done if you have backup files elsewhere.
  344.  
  345.  ∙ If you only need to browse the first part of a very large file, or if
  346.    you have started loading a very large file by mistake, you can press
  347.    <ctrl break> to interrupt the loading process at any point. Note that
  348.    the loaded file will be truncated, and you will be prompted with
  349.    "Truncated file - are you sure?" whenever you try to save the file.
  350.  
  351.  
  352. AML Macros
  353. ──────────
  354.  ∙ To obtain context-sensitive help on a macro language statement or
  355.    function at the cursor, press <shift f1> for a brief description, or
  356.    press <shift f2> for extended help. Note that most extension
  357.    functions (EXT.AML source code) are not documented. For these
  358.    functions, the cursor is moved to the function definition in EXT.AML.
  359.  
  360.  ∙ To compile and run an external macro in the current edit window, just
  361.    enter the 'compilemacro2' <shift f10> and 'runmacro2' <shift f11>
  362.    commands. These commands help to simplify macro development and
  363.    testing.
  364.  
  365.  ∙ You can use the 'pickmacro' <shift f12> command to obtain a picklist
  366.    of macros in the MACRO subdirectory. To run a macro from the
  367.    picklist, move the cursor to the desired macro and press the <enter>
  368.    key or click the left mouse button.
  369.  
  370.  ∙ Before modifying any internal macro code (EXT.AML, KBD.AML, etc.), be
  371.    sure to make backup copies of your AML files. You should be
  372.    reasonably familiar with the macro language before attempting these
  373.    types of modifications.
  374.  
  375.  ∙ AML has a simpler function call syntax than most programming
  376.    languages. Here are a few things to keep in mind when calling AML
  377.    functions:
  378.  
  379.    If function calls with arguments are used in expressions, the entire
  380.    function call should be enclosed with parentheses, not just the
  381.    arguments. For example:
  382.  
  383.      x = fun1 (1) + fun2 (2, 3, 4);    // BASIC, Pascal, C
  384.      x = (fun1 1) + (fun2 2 3 4)       // AML
  385.  
  386.    Function calls which have no arguments, and which are preceded or
  387.    followed by operators, do not need parentheses:
  388.  
  389.      x = fun1 () + fun2 ();     // BASIC, Pascal, C
  390.      x = fun1 + fun2            // AML
  391.  
  392.    If a single function call is an argument to another function, and is
  393.    not preceded or followed by an operator, then it must be enclosed in
  394.    parentheses. For example:
  395.  
  396.      x = fun1 (1, fun2 (), fun3 (2, 3, 4));   // BASIC, Pascal, C
  397.      x = fun1 1 (fun2) (fun3 2 3 4)           // AML
  398.  
  399.  ∙ The 'key' statement is terminated by the keywords 'end', 'key', or
  400.    'function', but not by the keyword 'object'. For example:
  401.  
  402.      key <alt c>   copy          // key definition for <alt c>
  403.      key <alt d>   deleteline    // key definition for <alt d>
  404.      end                         // end is required here
  405.  
  406.      object  fmgr                // change the current object
  407.        .
  408.        .
  409.  
  410.  ∙ New macros and AML configuration files will continue to be posted on
  411.    the Aurora Support BBS (see READ.ME for access details). Many of
  412.    these macros may only be available to licensed users. You may wish to
  413.    check the BBS periodically for new macros.
  414.  
  415.